--- 模块功能：给海纳云发送心跳
-- @author zhfh
-- @module mqtt.mqttTask
-- @license MIT
-- @copyright openLuat
-- @release 2023.03.24
module(..., package.seeall)

require "misc"
require "mqtt"
require "mqttOutMsg"
require "nvm"
-- 初始化nvm获取配置参数
nvm.init("config.lua", true)
--参数初始化

-- 启动MQTT客户端任务
local function heartBeatSend()
    sys.taskInit(function()
        while true do
            log.info("heartBeatSend_task")
            sys.wait(180000)
            mqttOutMsg.insertMsgUser("online", 0)
        end
    end)
end

--heartBeatSend()